﻿using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Web.Script.Services;
using Frogism.Core;
using Frogism.Domain;
using System.Text;

namespace Frogism.Web {
  /// <summary>
  /// Summary description for BookService
  /// </summary>
  [WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  [System.ComponentModel.ToolboxItem(false)]
  // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
  // [System.Web.Script.Services.ScriptService]
  [System.Web.Script.Services.ScriptService]
  public class BookService : System.Web.Services.WebService {

    [WebMethod]
  [ScriptMethod(ResponseFormat=ResponseFormat.Json)]
    public Core.IAuthor AddAuthor(string name) {
      Core.Author a = new Frogism.Core.Author();
      a.Name = name;

      return ManagerService.GetAuthorManager().Insert(a);
 
    }
  }
}
